﻿<UserControl x:Class="WTwitter.View.SubmitView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:vm="clr-namespace:WTwitter.ViewModel"
	xmlns:vw="clr-namespace:WTwitter.View"
	xmlns:compModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
	Loaded="UserControl_Loaded">
	<DockPanel>
		<StatusBar DockPanel.Dock="Bottom" HorizontalContentAlignment="Stretch">
			<TextBlock Text="{Binding Path=StatusMessage}"/>
		</StatusBar>
		
		<!--下のテキスト入力エリア-->
		<DockPanel DockPanel.Dock="Bottom">
			<DockPanel DockPanel.Dock="Right">
				<TextBlock Text="{Binding Path=TextLimitRemain}" DockPanel.Dock="Top" HorizontalAlignment="Right"/>
				<Button Content="投稿" Command="{Binding Path=SubmitCommand}"
						HorizontalAlignment="Right" Width="Auto" Style="{DynamicResource DesignedButtonStyle}"/>
			</DockPanel>
			<TextBox x:Name="TextArea" Text="{Binding Path=EditingText, UpdateSourceTrigger=PropertyChanged}"
					 MinLines="3" TextWrapping="Wrap" Background="{DynamicResource TextBoxBackgroundBrush}"/>

		</DockPanel>
		
		<!--真ん中のボタン群-->
		<UniformGrid DockPanel.Dock="Bottom" Columns="4">
			<Button Command="{Binding Path=ReplyCommand}" Style="{DynamicResource DesignedButtonStyle}">返信</Button>
			<Button Command="{Binding Path=ReTweetCommand}" Style="{DynamicResource DesignedButtonStyle}">ReTweet</Button>
			<Button Command="{Binding Path=DirectMessageCommand}" Style="{DynamicResource DesignedButtonStyle}">メッセージ</Button>
			<Button Command="{Binding Path=ShortenUrlCommand}" Style="{DynamicResource DesignedButtonStyle}">URL短縮</Button>
		</UniformGrid>
		
		<!--必要に応じて上部に表示される参照タイムライン-->
		<ContentPresenter Content="{Binding Path=Timeline}"/>
	</DockPanel>
</UserControl>
